package com.qf.boot220302.ex;

import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.stereotype.Component;

@Data
@Component
@NoArgsConstructor
public class UserException extends Exception {

    private Integer code;

    private String exmsg;

    public UserException(Integer code, String exmsg){

        super(exmsg); // 调用父类的单参构造函数
        this.code = code;
        this.exmsg = exmsg;

    }

}
